package com.xywy.wjk.util;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class DeviceState {

	public static final String DEVICE_WEIGHT_SCALE = "weight_sclae"; // 体重秤
	public static final String DEVICE_BLOOD_PAUSERE = "blood_pausere"; // 血压计

	private static SharedPreferences sp;
	private static Editor editor;
	public static final String DEVICECONNECTTIME = "deviceConnectTime";
	
	
	//上传数据
	public static final String E_NUMBERSTR = "temp_automactily_device_identify"; //设备号  md5
	public static final String WEIGHT_TYPE = "1";  //写死了 就是1
	public static final String WEIGHT_DE_ID = "1"; //暂时写死
	public static final String WEIGHT_DEVICENAME = "Xunyiwenyao";
	public static final String BLOOD_TYPE = "3";  //写死了 就是1
	public static final String BLOOD_DE_ID = "3"; //暂时写死
	public static final String BLOOD_DEVICENAME = "KBB3-1-BLE";
	public static final String uploadDeviceUrl = "http://api.yun.xywy.com/index.php/server/api/equipment/synchronize_data";

	/**
	 * 获取设备的连接状态
	 * 
	 * @param Device
	 *            设备名称；
	 * @return false 设备打开过 true 设备打开过
	 */
	public static boolean getDeviceState(Context context, String Device) {
		sp = context.getSharedPreferences(Device, Context.MODE_PRIVATE);
		return sp.getBoolean("state", false);
	}

}
